<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Psa_Plugin_After_Group_Create</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../../media/images/AbstractClass_logo.png"
														alt="Abstract Class"
														title="Abstract Class"
														style="vertical-align: middle"> Psa_Plugin_After_Group_Create</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-vars">Vars</a>
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Abstract class for plugins type of <em>Psa_Plugin_After_Group_Create</em>.</p>
<p class="description"><p>You can start new group creation process by passing '<kbd>new</kbd>' to <a href="../../psa/Psa_Group.html">Psa_Group</a> class constructor. See  <a href="../../psa/Psa_Group.html#method__construct">constructor</a> method of <a href="../../psa/Psa_Group.html">Psa_Group</a> class.</p><p>After a new group is successfully created with <a href="../../psa/Psa_Group.html#methodsave">save()</a> method of the <a href="../../psa/Psa_Group.html">Psa_Group</a> object,  <a href="../../psa/plugins/Psa_Plugin_After_Group_Create.html#methodpsa_main">psa_main()</a> method of the plugin object that extends this class will be called.  You can write <em>Psa_Plugin_After_Group_Create</em> plugins by extending this class. Here is an example:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">class&nbsp;</span><span class="src-id">my_plugin&nbsp;</span><span class="src-key">extends&nbsp;</span><a href="../../psa/plugins/Psa_Plugin_After_Group_Create.html">Psa_Plugin_After_Group_Create</a><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;you&nbsp;have&nbsp;to&nbsp;define&nbsp;psa_main()&nbsp;method&nbsp;in&nbsp;your&nbsp;child&nbsp;class</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><span class="src-id">psa_main</span><span class="src-sym">(</span><span class="src-var">$group</span><span class="src-sym">)</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;set&nbsp;some&nbsp;property&nbsp;to&nbsp;new&nbsp;group</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$group</span><span class="src-sym">-&gt;</span><span class="src-id">good_students&nbsp;</span>=&nbsp;<span class="src-str">'yes'</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;you&nbsp;can&nbsp;put&nbsp;here&nbsp;any&nbsp;logic&nbsp;you&nbsp;need</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p><p>When this example plugin is registered every new created group will have property called  <kbd>good_students</kbd> with value '<kbd>yes</kbd>'.</p><p><strong>Note:</strong> if you set some property to the group like <em>good_students</em> in example above  that will not be saved until you call save() method again later, cause that property will be set  after the group object is saved to the database.</p></p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../../psa/plugins/Psa_Plugin_After_User_Create.html">Psa_Plugin_After_User_Create</a></li>
				<li><span class="field">see:</span> <a href="../../psa/Psa_Group.html">Psa_Group</a></li>
				<li><span class="field">see:</span> <a href="../../psa/Psa_Group.html#method__construct">Psa_Group::__construct()</a></li>
				<li><span class="field">see:</span> <a href="../../psa/Psa_Group.html#methodsave">Psa_Group::save()</a></li>
				<li><span class="field">abstract:</span> </li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_plugin_classes---Psa_Plugin_After_Group_Create.class.php.html">/plugin_classes/Psa_Plugin_After_Group_Create.class.php</a> (line <span class="field"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_After_Group_Create.class.php.html#a66">66</a></span>)
		</p>
		
				
		<pre><a href="../../psa/plugins/Psa_Plugin_Model.html">Psa_Plugin_Model</a>
   |
   --Psa_Plugin_After_Group_Create</pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-vars">Vars</a>
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																								<div class="method-definition">
					<img src="../../media/images/AbstractMethod.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#psa_main" title="details" class="method-name">psa_main</a>
											(<span class="var-type"><a href="../../psa/Psa_Group.html">Psa_Group</a></span>&nbsp;<span class="var-name">$group_object</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
							<h4>Inherited Variables</h4>
				<A NAME='inherited_vars'><!-- --></A>
									<p>Inherited from <span class="classname"><a href="../../psa/plugins/Psa_Plugin_Model.html">Psa_Plugin_Model</a></span></p>
					<blockquote>
													<img src="../../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../../psa/plugins/Psa_Plugin_Model.html#var$psa_database">Psa_Plugin_Model::$psa_database</a></span><br>
							</span>
													<img src="../../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../../psa/plugins/Psa_Plugin_Model.html#var$psa_registry">Psa_Plugin_Model::$psa_registry</a></span><br>
							</span>
													<img src="../../media/images/Variable.png" />
							<span class="var-title">
								<span class="var-name"><a href="../../psa/plugins/Psa_Plugin_Model.html#var$psa_result">Psa_Plugin_Model::$psa_result</a></span><br>
							</span>
											</blockquote> 
										
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-vars">Vars</a>
														<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodpsa_main" id="psa_main"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../../media/images/AbstractMethod.png" />
		<span class="method-title">psa_main</span> (line <span class="line-number"><a href="../../__filesource/fsource_psa_plugins_plugin_classesPsa_Plugin_After_Group_Create.class.php.html#a74">74</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method will be called after new group is successfully created with <a href="../../psa/Psa_Group.html#methodsave">save()</a>  method of the <a href="../../psa/Psa_Group.html">Psa_Group</a> object.</p>
	<ul class="tags">
				<li><span class="field">see:</span> Psa_Group::authorize()</li>
				<li><span class="field">abstract:</span> </li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			psa_main
		</span>
					(<span class="var-type"><a href="../../psa/Psa_Group.html">Psa_Group</a></span>&nbsp;<span class="var-name">$group_object</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"><a href="../../psa/Psa_Group.html">Psa_Group</a></span>
				<span class="var-name">$group_object</span><span class="var-description">: reference to the <a href="../../psa/Psa_Group.html">Psa_Group</a> object whose <a href="../../psa/Psa_Group.html#methodsave">save()</a> method is invoked</span>			</li>
				</ul>
		
			
	</div>
							<h4>Inherited Methods</h4>
				<a name='inherited_methods'><!-- --></a>	
									<!-- =========== Summary =========== -->
					<p>Inherited From <span class="classname"><a href="../../psa/plugins/Psa_Plugin_Model.html">Psa_Plugin_Model</a></span></p>
					<blockquote>
													<img src="../../media/images/Constructor.png" alt=" "/>
							<span class="method-name"><a href="../../psa/plugins/Psa_Plugin_Model.html#method__construct">Psa_Plugin_Model::__construct()</a></span><br>
											</blockquote>
										
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Thu, 21 Oct 2010 01:40:53 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>